qx.Class.define("bip.services.CategoriesService",
{
  extend : qx.core.Object,

  properties : {
    categories : {
      nullable: true,
      event: "changeCategories"
    }
  },
  

  members :
  {
    __store : null,
    
    fetchCategories : function() {
      if (this.__store == null) {
    	var url = "/categories/getOneCategoryByIdLocalList";
    	this.__store = new bip.rpc.Json(url, null);
        this.__store.bind("model", this, "categories");
      } else {
        this.__store.reload();
      }
    }
  }
});